/**
 * @file drawing_render.h
 * @brief GDI rendering pipeline with double-buffering
 */

#ifndef DRAWING_RENDER_H
#define DRAWING_RENDER_H

#include <windows.h>

/**
 * Main paint handler for WM_PAINT
 * @param hwnd Window handle
 * @param ps Paint structure from BeginPaint
 * @note Double-buffering eliminates flicker
 * @note Window auto-resizes to fit text
 */
void HandleWindowPaint(HWND hwnd, PAINTSTRUCT* ps);

/**
 * Render custom text using the same overlay style as the main countdown
 * @param hwnd Window handle
 * @param ps Paint structure from BeginPaint
 * @param text Pre-formatted wide text to render (e.g., L"00:24")
 */
void RenderCustomText(HWND hwnd, PAINTSTRUCT* ps, const wchar_t* text);

/**
 * Render text with style overrides and explicit edit-mode.
 * @param overrideColorStr "#RRGGBB" or "R,G,B"; NULL to use active color
 * @param overrideFontInternalName Internal font name or NULL to use active
 * @param overrideFontScaleFactor >0 to override scale; <=0 to use active scale
 * @param editModeOverride TRUE for darker background edit mode
 */
void RenderCustomTextEx(HWND hwnd, PAINTSTRUCT* ps, const wchar_t* text,
                        const char* overrideColorStr,
                        const char* overrideFontInternalName,
                        float overrideFontScaleFactor,
                        BOOL editModeOverride);

#endif /* DRAWING_RENDER_H */

